package com.csu.device.web;

import com.csu.device.service.HardWareService;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

@Controller
public class HardWareController {

    @Autowired
    private HardWareService hardWareService;

    @RequestMapping(value = "find")
    @ResponseBody
    public List<Map<String,Object>> findUserByName() {
        return hardWareService.findAll();
    }


    @GetMapping("example")
    public String DeviceExample() {
        return "device/example";
    }

}
